package javaBase.nowcoder.HJ30_S_字符串合并处理;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.util.ArrayList;
import java.util.Locale;
import java.util.stream.Collectors;

public class MainMe {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String s1 = br.readLine();
        s1 = s1.replaceAll(" ", "");

        char chars[] = s1.toCharArray();
        ArrayList list0 = new ArrayList();
        ArrayList list1 = new ArrayList();

        for (int i = 0; i < chars.length; i++) {
            if (i % 2 == 0) {
                list0.add(chars[i]);
            } else {
                list1.add(chars[i]);
            }
        }
        list0 = (ArrayList) list0.stream().sorted().collect(Collectors.toList());
        list1 = (ArrayList) list1.stream().sorted().collect(Collectors.toList());

        ArrayList<String> arrayList = new ArrayList<>();
        for (int i = 0; i < list0.size(); i++) {
            chars[i * 2] = (char) list0.get(i);
        }
        for (int i = 0; i < list1.size(); i++) {
            chars[i * 2 + 1] = (char) list1.get(i);
        }
        String dict = "0123456789ABCDEF";
        for (int i = 0; i < chars.length; i++) {
            if ('0' <= chars[i] && chars[i] <= '9') {
                String s = new StringBuilder("0000"+Integer.toBinaryString(Integer.parseInt(chars[i]+""))).reverse().substring(0,4).toString();
                int index = Integer.parseInt(s, 2);
                chars[i] = dict.charAt(index);
            }else            if (('A' <= chars[i] && chars[i] <= 'F') || ('a' <= chars[i] && chars[i] <= 'f')) {
                String aA_fF = String.valueOf(chars[i]);
                String s = new StringBuilder(Integer.toBinaryString(dict.indexOf(aA_fF.toUpperCase(Locale.ROOT)))).reverse().toString();
                int index = Integer.parseInt(s, 2);
                chars[i] = dict.charAt(index);
            }
        }
        System.out.println(chars);
    }

}
//Eqr v9oEb12U2ur4xu7rd931G1f50qDo
//8084842 CAE 9B9G7D7BUFooqqrrrvuxu
//8084842 357 9B9G7D7BUFooqqrrrvuxu
